/*
 * beix.h
 * Copyright (c) 2010 Peter Polacik <polacik.p@gmail.com>
 *
 * This file is part of Beix Operating System
 *
 * Licensed under MIT License, see COPYRIGHT for more information.
 */

#ifndef _BEIX_H_
#define _BEIX_H_

#include <screen.h>

/* Variable types definitions */
typedef unsigned char	u8int;
typedef signed	 char	s8int;
typedef unsigned short	u16int;
typedef	signed	 short	s16int;
typedef unsigned int	u32int;
typedef signed 	 int	s32int;
typedef int		size_t;

/* MAIN.C */
extern void *memcpy(void *dest, const void *src, size_t count);
extern void *memset(void *dest, char val, size_t count);
extern u16int *memsetw(u16int *dest, u16int val, size_t count);
extern size_t strlen(const char *str);
extern u8int inportb(u16int _port);
extern void outportb(u16int _port, u8int _data);
/* MAIN.C */

/* SCREEN.C */
extern void scroll(void);
extern void move_csr(void);
extern void clear(void);
extern void putc(char c);
extern void puts(char *s);
extern void settextcolor(u8int forecol, u8int backcol);
extern void init_video(void);
/* SCREEN.C */

/* GDT.C */
extern void gdt_set_gate(int num, unsigned long base, unsigned long limit, u8int access, u8int gran);
extern void gdt_install(void);
/* GDT.C */

#endif /* _BEIX_H_ */
